package chamster.actions;

import chamster.BaseHamster;

public class MoveRightAction<HamsterType extends BaseHamster> 
	implements HamsterAction<HamsterType> {

	public boolean isApplicable(HamsterType hamster) throws Exception {
		return hamster.getView().canMoveRight() 
				&& hamster.chargeLeft(3);
	}

	public void run(HamsterType hamster) throws Exception {
		hamster.turnRight();
		hamster.foreward();
		hamster.turnLeft();
	}

}
